--Execute as oe/oe
CREATE OR REPLACE PROCEDURE get_avg_order
(p_cust_id NUMBER, p_cust_last_name VARCHAR2, p_order_tot NUMBER)
IS
   v_cust_ID customers.customer_id%type;
   v_cust_name customers.cust_last_name%type;
   v_avg_order NUMBER;
BEGIN
SELECT customers.customer_id, customers.cust_last_name, AVG(orders.order_total)
INTO v_cust_id, v_cust_name, v_avg_order
FROM CUSTOMERS, ORDERS
WHERE customers.customer_id=orders.customer_id
GROUP BY customers.customer_id, customers.cust_last_name;
END;
/